<?php namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Request;

class ConfigServiceProvider extends ServiceProvider {

	/**
	 * Overwrite any vendor / package configuration.
	 *
	 * This service provider is intended to provide a convenient location for you
	 * to overwrite any "vendor" or package configuration that you may want to
	 * modify before the application handles the incoming request / command.
	 *
	 * @return void
	 */
	public function register()
	{
        config([
            'latrell-swagger.paths' => [
                'app/Models',
                'app/Http/Routes/Api'
            ],
        ]);
//        $request = Request::instance();
////        $host = $request->headers->get('host');
//        $server = $request->server->get('REDIRECT_URL');
//
//        var_dump($request->server->get('REDIRECT_URL'));exit;
//
//        switch ($host) {
//            case env('DOMAIN_ADMIN'):
//                config([
//                    'auth.model' => 'App\Models\Admin',
//                    'app.url' => env('DOMAIN_ADMIN')
//                ]);
//                break;
//            case env('DOMAIN_API'):
//                config([
//                    'auth.model' => 'App\Models\User',
//                    'latrell-swagger.paths' => [
//                        'app/Models',
//                        'app/Http/Routes/Api'
//                    ],
//                    'app.url' => env('DOMAIN_API')
//                ]);
//                break;
//            case env('DOMAIN_WAP'):
//                config([
//                    'auth.model' => 'App\Models\User',
//                    'app.url' => env('DOMAIN_WAP')
//                ]);
//                break;
//            default:
//                break;
//        }
	}

}
